import { PageEnum } from '@/enums/common'

export const TABBAR_STORAGE_KEY = '__APP_TABBAR__'

export const tabbar = reactive({
  value: uni.getStorageSync<string>(TABBAR_STORAGE_KEY) || PageEnum.Home,
  setValue: (value: string) => {
    tabbar.value = value
    uni.setStorageSync(TABBAR_STORAGE_KEY, value)
  },
})
